home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15157 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  848 b 

  1. Path: news.umbc.edu!not-for-mail
  2. From: schlein@umbc.edu (Jonas J. Schlein)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Union type
  5. Date: 17 Apr 1996 11:55:51 -0400
  6. Organization: University of Maryland Baltimore County
  7. Message-ID: <4l34a7$7nk@umbc9.umbc.edu>
  8. References: <4kh43f$h4f@dewey.csun.edu>
  9. NNTP-Posting-Host: umbc9.umbc.edu
  10. NNTP-Posting-User: schlein
  11.  
  12. In article <4kh43f$h4f@dewey.csun.edu>, chen <kc44097@csun.edu> wrote:
  13. |> My question is : Why myUnion.integer is 1 but myUnion.floating is
  14. |> 0.000000;Why myUnion.integer change to 0.000000 in 4th printf(),
  15. |> and why myUnion.floating is 0 in 5th printf()?
  16.  
  17. Maybe because integers and floating point numbers are represented differently
  18. internally? Why do you expect them to be the same?
  19. -- 
  20. "If it wasn't for C, we would be using BASI, PASAL, and OBOL."
  21.  
  22. Jonas J. Schlein  (schlein@gl.umbc.edu)
  23.